package com.xiaobao.coalproperty.other.util;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class HttpHelperUtils {

    private static volatile HttpHelperUtils mHttpHelperUtils = null;

    private HttpHelperUtils() {
    }

    public synchronized static HttpHelperUtils getInstance() {
        if (mHttpHelperUtils == null) {
            mHttpHelperUtils = new HttpHelperUtils();
        }
        return mHttpHelperUtils;
    }

    public synchronized Map<String, String> loginParams(String phone, String pwd) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "06e4da5a44cd934628c669da61eb6840");
        params.put("phone", phone);
        params.put("password", pwd);
        return params;
    }


    public synchronized Map<String, String> registerParams(String phone, String checkcode, String password, String re) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "b0f5a63ceb37e293cc88a9b41daa2d61");
        params.put("phone", phone);
        params.put("checkcode", checkcode);
        params.put("password", password);
        params.put("repassword", re);
        return params;
    }

    public synchronized Map<String, String> indexParams() {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "70ffcb2a3569065c4420776b8a81809b");
        return params;
    }

    public synchronized Map<String, String> priceParams(String start, String end) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "0344c1aa6ad97936d9f57c6813e0fcdc");
        params.put("start_time", start);
        params.put("end_time", end);
        return params;
    }

    public synchronized Map<String, String> goodsDetailParams(String id) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "3435103f11f21993476fe72ff7a20b8f");
        params.put("id", id);
        return params;
    }

    public synchronized Map<String, String> goodsListParams(String page) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "ba83adc9ac87be55baf2966d4f5408cd");
        params.put("page", page);
        return params;
    }

    public synchronized Map<String, String> orderSubmitParams(String gid, String num) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "db6351bff8ffac5c258cf21026f52c52");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("gid", gid);
        params.put("num", num);
        return params;
    }

    public synchronized Map<String, String> setTransactionPasswordParams(String transaction_password, String re_transaction_password) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "24575ccdb2bad3d190e1c8e65cf2459f");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("transaction_password", transaction_password);
        params.put("re_transaction_password", re_transaction_password);
        return params;
    }

    public synchronized Map<String, String> goodsCollectionParams(String gid) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "26b34e6d83e073b2350037995dc3f5ec");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("gid", gid);
        return params;
    }

    public synchronized Map<String, String> findIndexParams() {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "70ffcb2a3569065c4420776b8a81809b");
        return params;
    }

    public synchronized Map<String, String> forumListParams(String hashid, String uid, String page) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "1522546fb8e6c8b6c2d37837e99d0730");
        params.put("hashid", hashid);
        params.put("uid", uid);
        params.put("page", page);
        return params;
    }

    //【1首页轮播 2论坛社区 3新闻资讯】
    public synchronized Map<String, String> carouselParams(String type) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "9f7a999afac43e6b50ef7204f69f93b7");
        params.put("type", type);
        return params;
    }

    public synchronized Map<String, String> forumDetailParams(String id) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "39a851a7218472226ece36d1377f3cf0");
        params.put("id", id);
        return params;
    }

    public synchronized Map<String, String> addForumCommentParams(String forum_id, String content) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "a023678fae0b3f2b50013f19d438d4c2");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("forum_id", forum_id);
        params.put("content", content);
        return params;
    }

    public synchronized Map<String, String> addForumParams(String title, String content) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "7acb96e054ef032c4d94104f99c6e4c4");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("title", title);
        params.put("content", content);
        return params;
    }

    public synchronized Map<String, String> newsListParams(String page) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "ba83adc9ac87be55baf2966d4f5408cd");
        params.put("page", page);
        return params;
    }

    public synchronized Map<String, String> centerIndexParams() {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "e785f07736bde4d62b77d03214d29647");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        return params;
    }

    public synchronized Map<String, String> forgetPwdParams(String phone, String checkcode, String newpwd, String renewpwd) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "abd675c09c0e5b7031ea5f32b2f0c3c9");
        params.put("phone", phone);
        params.put("checkcode", checkcode);
        params.put("newpwd", newpwd);
        params.put("renewpwd", renewpwd);
        return params;
    }

    //[1手机短信注册 2找回密码 3手机短信登录 4解除手机绑定 5手机绑定 6绑定第三方 7找回交易密码]
    public synchronized Map<String, String> sendCodeParams(String mobile, String checktype) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "c5ea4773f8c6122731ef99bcf1b960a8");
        params.put("mobile", mobile);
        params.put("checktype", checktype);
        return params;
    }

    public synchronized Map<String, String> setBankInfoParams(String account_person, String bank_name, String bank_account) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "4f34b3485609cd4716b618614d1d037d");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("account_person", account_person);
        params.put("bank_name", bank_name);
        params.put("bank_account", bank_account);
        return params;
    }

    public synchronized Map<String, String> forgetTransactionPasswordParams(String phone, String checkcode, String newpwd) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "b0e6ffb8ce209f943ecc527710bf0d54");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("phone", phone);
        params.put("checkcode", checkcode);
        params.put("newpwd", newpwd);
        params.put("renewpwd", newpwd);
        return params;
    }

    public synchronized Map<String, String> goodsCollectionListParams(String page) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "1522546fb8e6c8b6c2d37837e99d0730");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("page", page);
        return params;
    }

    public synchronized Map<String, String> withdrawParams(String money, String transaction_password) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "772b65e4390b21beb781d313ecb1b6ab");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("money", money);
        params.put("transaction_password", transaction_password);
        return params;
    }

    public synchronized Map<String, String> updateTransactionPwdParams(String oldpwd, String newpwd, String repeatpwd) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "d889fb1feccacc88634963c636d402e6");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("oldpwd", oldpwd);
        params.put("newpwd", newpwd);
        params.put("repeatpwd", repeatpwd);
        return params;
    }

    public synchronized Map<String, String> mobileBindFirstParams(String phone, String checkcode) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "487be95de30550baf7944c1bde70fa8c");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("phone", phone);
        params.put("checkcode", checkcode);
        return params;
    }

    public synchronized Map<String, String> assetListParams(String page) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "1522546fb8e6c8b6c2d37837e99d0730");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("page", page);
        return params;
    }

    public synchronized Map<String, String> assetDetailParams(String id) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "3435103f11f21993476fe72ff7a20b8f");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("id", id);
        return params;
    }

    public synchronized Map<String, String> assetSubmitParams(String id, String sell_type, String sell_money, String sell_ratio, String sell_num) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "2b7626e6244d3d69e0ffe1767568359c");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("id", id);
        params.put("sell_type", sell_type);
        params.put("sell_money", sell_money);
        params.put("sell_ratio", sell_ratio);
        params.put("sell_num", sell_num);
        return params;
    }

    public synchronized Map<String, String> assetEntrustListParams(String page) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "1522546fb8e6c8b6c2d37837e99d0730");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("page", page);
        return params;
    }

    public synchronized Map<String, String> managerSubmitParams(String avatar,String nickname,String sex,String birthday ,String province,String area,String county) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "177dde1d31f474684dde0603e484d59c");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("avatar", avatar);
        params.put("nickname", nickname);
        params.put("sex", sex);
        params.put("birthday", birthday);
        params.put("province", province);
        params.put("area", area);
        params.put("county", county);
        return params;
    }

    public synchronized Map<String, String> uploadPictureParams() {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "03e302fce391af2497f499e28c30061b");
        params.put("uploadname", "uploadname");
        return params;
    }


    public synchronized Map<String, String> certificationSubmit(String true_name,String id_card,String id_front_img,String id_back_img,String id_hand_img) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "b572e98c971e6b109afdebdd49482096");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("true_name", true_name);
        params.put("id_card", id_card);
        params.put("id_front_img", id_front_img);
        params.put("id_back_img", id_back_img);
        params.put("id_hand_img", id_hand_img);
        return params;
    }

    public synchronized Map<String, String> setAssetEntrustParams(String id) {
        Map<String, String> params = new HashMap<>();
        params.put("time", String.valueOf(System.currentTimeMillis()));
        params.put("hash", "3435103f11f21993476fe72ff7a20b8f");
        params.put("hashid", UserHelperUtils.getInstance().getHashId());
        params.put("uid", UserHelperUtils.getInstance().getUid());
        params.put("id", id);
        return params;
    }

}
